﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace hse_2013_photo_viewer
{
    public partial class MainForm : Form
    {
        
        public MainForm()
        {
            InitializeComponent();

            Logger.LogMessage += new Action<string>(Console.WriteLine);
            Logger.LogMessage("MainForm initialized");


        }
     

        private void chooseDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                
                if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
                {
                    pictureViewingUI1.path = folderBrowserDialog1.SelectedPath;
                    pictureViewingUI1.RenewUI();
                    Logger.LogMessage("Directory changed");
                }
                else
                {
                    Logger.LogMessage("Path was not changed by the user!");
                }
            }
            catch
            {
                
            }
        }

        private void MainForm_Load(object sender, EventArgs e)
        {

        }


    }
}
